package PowerWord.Core.ReciteEffect;

public class WordProperty {
	public static final byte Defined	= (byte) 0xC0;//1***,****
	public static final byte Basic		= (byte) 0x10;//***1,****
	public static final byte Important	= (byte) 0x20;//**1*,****
	public static final byte Wrong		= (byte) 0x40;//*1**,****

	public static enum FamiliarLevel{Rare, Blur, Normal, Known,}//****,**XX
	
	static final byte FamiliarLevelFilter = (byte) 0xFC;
	
	
	public static byte SetFamiliarLevel(byte flag, FamiliarLevel e){
		return (byte) ((flag & FamiliarLevelFilter) | e.ordinal() | Defined);
	}
	
	public static byte SetWordProperty(byte flag, byte bit){
		return (byte) (flag | bit | Defined);
	}
	
	public static int GetFimiliarLevel(byte flag){
		if((flag & Defined) == 0){
			return 4;
		}
		return flag & ~FamiliarLevelFilter;
	}
}
